package poker;
import java.util.ArrayList;

/** KLASA Deck - TALIA. */
public class DeckGui {
  
/** LISTA KART. */
  private ArrayList<CardGui> cards;

  /** KONSTRUKTOR KLASY Deck. */
  public DeckGui(Deck deck) {
  	int i;
    cards = new ArrayList<CardGui>();
	for (i = 0; i < 52; i++)	{
		cards.add(new CardGui(deck.getCard(i).getSuit(),deck.getCard(i).getRank()));
	}
  }

  /** @return KARTA Z WIERZCHU, KTORA PO POBRANIU JEST USUNIETA. */
  public CardGui drawFromDeck() {
	  return cards.remove(0);
  }

  /** @return i-ta KARTA. */
  public CardGui getCard(int i) {
    return cards.get(i);
  }

  /** @return POZOSTALA W TALII ILOSC KART. */
  public int getTotalCards() {
    return cards.size();
  }

}